﻿<%@ Page Title="群組權限" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="GroupRights.aspx.vb" Inherits="WebForm_Manage_GroupRights" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:ObjectDataSource ID="objDSMenu" runat="server" SelectMethod="GetMenuUID" TypeName="OAMS.BBL.MenuBBL">
                <SelectParameters>
                    <asp:ControlParameter ControlID="hiUID" Name="UID" PropertyName="Value" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:HiddenField ID="hiDBName" runat="server" />
            <table>
                <tr>
                    <td style="width: 400px; vertical-align: top"">
                        <TServerControl:TGridView ID="gvMenu" Width="400px" runat="server" DataSourceID="objDSMenu"
                            AllowHoverEffect="False" AllowHoverSelect="False" AllowPaging="True" ShowFooterWhenEmpty="False"
                            ShowHeaderWhenEmpty="False" TotalRowCount="0" SkinID="pager" AutoGenerateColumns="False"
                            DataKeyNames="ProgramID">
                            <Columns>
                                <asp:BoundField DataField="ProgramID" meta:resourcekey="ProgramID" />
                                <asp:BoundField DataField="Name" meta:resourcekey="Name" />
                                <asp:TemplateField meta:resourcekey="Setup">
                                    <FooterTemplate>
                                    </FooterTemplate>
                                    <ItemTemplate>
                                        <asp:Button ID="btnSetup" runat="server" CommandArgument='<%# Bind("ProgramID") %>'
                                            CommandName="Select" meta:resourcekey="btnSetup" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </TServerControl:TGridView>
                    </td>
                    <td>
                        &nbsp;&nbsp;&nbsp; &nbsp;
                    </td>
                    <td style="vertical-align: top">
                        <asp:Label ID="lblGroupID" Font-Size="12px" runat="server" meta:resourcekey="lblGroupID"></asp:Label>
                        <asp:DropDownList ID="ddlGroupID" runat="server" DataTextField="GroupName" DataValueField="GroupID"
                            AutoPostBack="True">
                        </asp:DropDownList>
                        <br />
                        <asp:Label ID="lblMenu" runat="server" meta:resourcekey="lblMenu"></asp:Label>
                        <asp:Label ID="lblMenuName" runat="server" Text=""></asp:Label>
                        <br />
                        <asp:ObjectDataSource ID="objDSGroupRights" runat="server" SelectMethod="GetGroupRights"
                            TypeName="OAMS.BBL.GroupBBL">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlGroupID" ConvertEmptyStringToNull="False" DefaultValue=""
                                    Name="GroupID" PropertyName="SelectedValue" Type="String" />
                                <asp:ControlParameter ControlID="gvMenu" ConvertEmptyStringToNull="False" DefaultValue="0"
                                    Name="ProgramID" PropertyName="SelectedValue" Type="Int32" />
                                <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                        <TServerControl:TGridView ID="gvGroupRights" runat="server" DataSourceID="objDSGroupRights"
                            SkinID="pager" Visible="False" AutoGenerateColumns="False" ShowHeaderWhenEmpty="True">
                            <Columns>
                                <asp:BoundField DataField="SeqNo" meta:resourcekey="RightID" />
                                <asp:BoundField DataField="DisplayName" meta:resourcekey="RightName" />
                                <asp:TemplateField meta:resourcekey="HasRight">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="cbUseRight" AutoPostBack="True" runat="server" Checked='<%# Eval("UseRight") %>'
                                            OnCheckedChanged="cbUseRight_CheckedChanged" ToolTip='<%# Eval("SeqNo") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </TServerControl:TGridView>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
